#ifndef EVENTLOOP_H
#define EVENTLOOP_H

#include <vector>

#include "object.h"

using namespace std;

class Event;

class EventLoop : public Object
{
public:
    EventLoop(Object* parent=0);
    virtual ~EventLoop();

    int exec();
    void quit();

    const std::vector<Event*>& events() const;
    std::vector<Event*>& events();
private:
    bool _running;
    std::vector<Event*> _events;
};

#endif // EVENTLOOP_H
